function mxGeometry(x, y, width, height)
{
	mxRectangle.call(this, x, y, width, height);
};
mxGeometry.prototype = new mxRectangle();
mxGeometry.prototype.constructor = mxGeometry;
mxGeometry.prototype.TRANSLATE_CONTROL_POINTS = true;
mxGeometry.prototype.alternateBounds = null;
mxGeometry.prototype.sourcePoint = null;
mxGeometry.prototype.targetPoint = null;
mxGeometry.prototype.points = null;
mxGeometry.prototype.offset = null;
mxGeometry.prototype.relative = false;
mxGeometry.prototype.swap = function()
{
	if (this.alternateBounds != null)
	{
		var old = new mxRectangle(this.x, this.y, this.width, this.height);
		this.x = this.alternateBounds.x;
		this.y = this.alternateBounds.y;
		this.width = this.alternateBounds.width;
		this.height = this.alternateBounds.height;
		this.alternateBounds = old;
	}
};
mxGeometry.prototype.getTerminalPoint = function(isSource)
{
	return(isSource) ? this.sourcePoint : this.targetPoint;
};
mxGeometry.prototype.setTerminalPoint = function(point, isSource)
{
	if (isSource)
	{
		this.sourcePoint = point;
	}
	else
	{
		this.targetPoint = point;
	}
	return point;
};
mxGeometry.prototype.translate = function(dx, dy)
{
	var clone = this.clone();

	if (!clone.relative)
	{
		clone.x += dx;
		clone.y += dy;
	}

	if (clone.sourcePoint != null)
	{
		clone.sourcePoint.x += dx;
		clone.sourcePoint.y += dy;
	}

	if (clone.targetPoint != null)
	{
		clone.targetPoint.x += dx;
		clone.targetPoint.y += dy;
	}

	if (this.TRANSLATE_CONTROL_POINTS && clone.points != null)
	{
		var count = clone.points.length;

		for (var i = 0; i < count; i++)
		{
			var pt = clone.points[i];

			if (pt != null)
			{
				pt.x += dx;
				pt.y += dy;
			}
		}
	}
	return clone;
};